{% extends "base.html" %}

{% autoescape off %}
{% block title %}| {{user_trophy.user.auth.username }} - Ultimos trofeus {% endblock %}
{% endautoescape %}

{% block body %}

<br/>

	{% include "tableUserInfo.html" %}

<br/>

<div class="pagination" align="center">
    <span class="step-links">
        {% if user_trophy_list.has_previous %}
            <a href="?page={{ user_trophy_list.previous_page_number }}"><</a>
        {% endif %}

        <span class="current">
            {{ user_trophy_list.number }} de {{ user_trophy_list.paginator.num_pages }}
        </span>

        {% if user_trophy_list.has_next %}
            <a href="?page={{ user_trophy_list.next_page_number }}">></a>
        {% endif %}
    </span>
</div>

<br/>

<table align="center">
	<tr height=35>
		<th align="center" > Jogo </th>
		<th align="center" > Trofeu </th>
		<th align="center" > Descricao do Trofeu </th>
		<th align="center" > Tipo </th>
	</tr>
{% for trophy in user_trophy_list.object_list %}
	{% if trophy.trophy %}
	<tr>
{% autoescape off %}
		<td> <img class="meio" src="/media/game/{{ trophy.trophy.game.psn_id}}/icon.png" width=160 height=88/> </td>
		<td>
			{% ifequal trophy.trophy.pic_url '0' %}
				<img class="meio" src="/media/no_image.png" width=54 height=54/>
			{% else %}
				{% ifequal trophy.trophy.pic_url 'hidden.png' %}
					<img class="meio" src="/media/hidden.png" width=54 height=54/>
				{% else %}
					<img class="meio" src="/media/game/{{ trophy.trophy.game.psn_id}}/{{trophy.trophy.pic_url}}" width=54 height=54/> </td>
				{% endifequal %}
			{% endifequal %}
		</td>
		<td width=300>
			<b>{{ trophy.trophy.name }}</b> <br/>
		   	{{ trophy.trophy.desc }} <br/>
			<div style ="color:#888;font-style:normal;">
		   	{{ trophy.date|date:"d-m-y H:i:s" }}
			</div>
		</td>

		<td>
			<img align="center" src="/media/{{ trophy.trophy.type}}.png" width=32 height=32> </td>
		</td>
{% endautoescape %}
	</tr>
	{% else %}
	<tr> <td colspan=4> {{trophy.id}}</td></tr>
	{% endif %}
{% endfor %}
</table>




{% endblock %}
